package de.tum.in.eist.poll.shared;

import com.google.gwt.user.client.rpc.IsSerializable;



/**
 * Abstract representation of the users by their login name, an encrypted password hash used salt.
 * @author max
 *
 */

public abstract class User implements IsSerializable{
	String login;
	byte[] passHash = new byte[0];
	byte[] salt = new byte[32];


	//Constructors
	
	public User(){
		
	}

	public User(String login){
		this.login = login;
	}

	public User(String login, byte[] passHash, byte[] salt) {
		this.login = login;
		this.passHash = passHash;
		this.salt = salt;
	}
	
	//Getter

	public byte[] getPassHash() {
		return passHash;
	}

	public String getLogin() {
		return login;
	}

	public byte[] getSalt() {
		return salt;
	}
	
	//Setter
	
	public void setPassHash(byte[] passHash) {
		this.passHash = passHash;
	}

	public void setSalt(byte[] salt) {
		this.salt = salt;
	}

}
